<?php namespace App\Infra;

use App\Utils\ModelOperatorTrait;
use App\Models\Complaint;
class ComplaintManager{
	use ModelOperatorTrait;

	public function getComplaints($conditions = null,$first = false,$union = []){
		return $this->findModel(Complaint::class,Complaint::query()->with($union),$conditions,$first);
	}

	public function updateComplaint($conditions = null,$data = null){
		$this->update(Complaint::class,Complaint::query(),$conditions,$data);
	}

	public function createComplaint($data){
		$this->create(Complaint::class,$data);
	}

	public function deleteComplaint($conditions = null){
		$this->delete(Complaint::class,Complaint::query(),$conditions);
	}
}